<!DOCTYPE html>
<html>
	<head>
		<!-- 设置浏览器不缓存 -->
		<META HTTP-EQUIV="pragma" CONTENT="no-cache">
		<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
		<META HTTP-EQUIV="expires" CONTENT="0">
		<!-- Content-Type -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<!-- Favicon -->
		<link rel="shortcut icon" href="./images/logo.png">
		<title>企业服务共享中心-考试</title>
		<!--stylesheets-->
		<link rel="stylesheet" href="./plugins/element/index.css">
		<script src="./plugins/vue/vue.js"></script>
		<script src="./plugins/element/index.js"></script>
		<script src="./plugins/vue/clipboard.js"></script>
		<script src="./plugins/axios/axios.min.js"></script>
		<script src="./js/common/public.js?v=0.8.0.3"></script>
		<!-- 自定义样式表 -->
		<link rel="stylesheet" href="./css/base.css?v=0.8.0.3">
	</head>
	<style type="text/css">
		.el-range-editor.el-input__inner {
			width: 200px;
		}

		.el-range-editor .el-range-input {
			width: 80px;
		}



		.el-form-item__datetimestyle .el-form-item__label {
			width: 50%;
		}


		.el-form-item__baseinfo .el-form-item__label {
			width: 50%;
		}

		.el-form-item__allbaseinfo .el-form-item__label {
			width: 100%;
		}


	</style>
	<body>
		<div id="app">
			<template>
				<el-container class="maincontainer">
					<el-container class="submaincontainer">
						<el-card class="box-card" style="position:relative;width:330px" shadow="never" v-show="leftbar_show">
							<div style="position:absolute;left:0;top:0;right:0;bottom:0;overflow-y:auto;overflow-x:hidden;padding-left: 20px;padding-top: 20px;padding-right: 20px;">
								<el-form :model="queryForm" ref="queryForm">
									<el-form-item label="考试状态" prop="state">
										<el-select v-model="queryForm.state" placeholder="请选择" clearable>
											<el-option v-for="item in stateoptions" :key="item.value" :label="item.label" :value="item.value">
											</el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="类型" prop="type">
										<el-select v-model="queryForm.type" placeholder="请选择" clearable @change="changeType($event)">
											<el-option v-for="item in typeoptions" :key="item" :label="item" :value="item">
											</el-option>
										</el-select>
									</el-form-item>

									<el-form-item label="分类型" prop="stype">
										<el-select v-model="queryForm.stype" multiple placeholder="请选择" clearable >
											<el-option v-for="item in smalltypeoptions" :key="item" :label="item" :value="item">
											</el-option>
										</el-select>
									</el-form-item>

									<el-form-item label="考试名称" prop="name">
										<el-input v-model="queryForm.name" maxlength="18" style="width: 217px;"></el-input>
									</el-form-item>

									<el-form-item label="添加时间" prop="addTime">
										<el-date-picker v-model="queryForm.addTime" type="datetimerange" value-format="yyyy-MM-dd" :picker-options="pickerOptions"
										 range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="left">
										</el-date-picker>
									</el-form-item>

									<el-form-item label="更新时间" prop="updateTime">
										<el-date-picker v-model="queryForm.updateTime" type="datetimerange" value-format="yyyy-MM-dd" :picker-options="pickerOptions"
										 range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="left">
										</el-date-picker>
									</el-form-item>

									<el-form-item>
										<el-button size="small" type="primary" @click.native.prevent="start" style="position:fixed;left:20px;bottom:5px;">查询</el-button>
									</el-form-item>
								</el-form>
							</div>
						</el-card>




						<el-card class="box-card" style="width:100%" shadow="never">
							<div slot="header" class="clearfix">
								<i v-on:click="showLeftBar()" v-bind:class="[leftbar_show ? 'el-icon-s-fold' : 'el-icon-s-unfold']" style="color:#409EFF;cursor:pointer;"></i>
								<span>考试列表</span>
								<el-button-group style="float: right;margin-top:0px;">
									<el-button size="small" icon="el-icon-document-add" type="primary" @click="toolAction('添加')">添加</el-button>
								</el-button-group>
							</div>
							<div>
								<el-table ref="multipleTable" @select='selectionChange' :data="pagedata" tooltip-effect="dark" :height="tableHeight"
								 border highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange">
									<el-table-column type="selection" min-width="55">
									</el-table-column>

									<el-table-column v-for="column in tablecolums" v-bind:prop="column.prop" v-bind:label="column.label"
									 v-bind:min-width="column.width" show-overflow-tooltip>
									</el-table-column>
									<el-table-column label="操作" min-width="80">
										<template slot-scope="scope">
											<el-link type="primary" @click="startexam(scope.$index, scope.row)" v-if="scope.row.state=='待开始'">开始考试</el-link>
											<el-link type="primary" @click="remove(scope.$index, scope.row)">删除</el-link>
										</template>
									</el-table-column>

								</el-table>


								<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentPageChange" :current-page="queryForm.pageNo"
								 :page-sizes="queryForm.pagesizes" :page-size="queryForm.pagesize" background layout="total,sizes, prev, pager, next"
								 :total="pagetotal">
								</el-pagination>
							</div>
		</div>
		</el-card>
		</el-container>
		</el-container>

		<el-dialog :close-on-click-modal="false" title="考试信息" :visible.sync="dialogFormVisible" width="600px">
			<el-form :model="testpaperForm" label-width="150px" :rules="dialogrules" ref="testpaperForm">
				<el-tabs v-model="activeName" @tab-click="handleClick">
					<el-tab-pane label="试卷信息" name="first">
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="考试名称" prop="name">
									<el-input v-model="testpaperForm.name" maxlength="20"></el-input>
								</el-form-item>
							</el-col>
						</el-row>

						<el-row :gutter="20">
							<el-col :span="16">
								<el-form-item label="考试类别" prop="type">
									<el-select v-model="testpaperForm.type"  placeholder="请选择" clearable>
										<el-option v-for="item in typeoptions" :key="item" :label="item" :value="item">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="16">
								<el-form-item label="考试分类别" prop="stype">
									<el-select v-model="testpaperForm.stype" multiple placeholder="请选择" clearable>
										<el-option v-for="item in smalltypeoptions" :key="item" :label="item" :value="item">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="单选" prop="danxuan">
									<el-input v-model="testpaperForm.danxuan" maxlength="20" @blur="getscore"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="多选" prop="duoxuan">
									<el-input v-model="testpaperForm.duoxuan" maxlength="20" @blur="getscore"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="题目数(每题5分)" prop="totalNumber">
									<el-input v-model="testpaperForm.totalNumber" maxlength="20" @blur="getscore" readonly></el-input>
								</el-form-item>
							</el-col>
						</el-row>

						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="考试截止日期" prop="endTime">
									<el-date-picker v-model="testpaperForm.endTime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
									</el-date-picker>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="及格线" prop="passMark">
									<el-input v-model="testpaperForm.passMark" maxlength="80"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="考试总分" prop="totalScore">
									<el-input v-model="testpaperForm.totalScore" maxlength="80"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
<!-- 						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="考试人数" prop="examineNumber">
									<el-input v-model="testpaperForm.examineNumber" maxlength="80" readonly></el-input>
								</el-form-item>
							</el-col>
						</el-row> -->
						<!-- 						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="通过人数" prop="passNumber">
									<el-input v-model="testpaperForm.passNumber" maxlength="80"></el-input>
								</el-form-item>
							</el-col>
						</el-row> -->
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="考试次数" prop="testTotalTimes">
									<el-input v-model="testpaperForm.testTotalTimes"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
	
						<el-row :gutter="20">
							<el-col :span="16">
								<el-form-item label="状态" prop="state">
									<el-select v-model="testpaperForm.state" placeholder="请选择" clearable>
										<el-option v-for="item in stateoptions" :key="item.value" :label="item.label" :value="item.value" :disabled="item.disabled">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
					</el-tab-pane>
					<el-tab-pane label="人员选择" name="second">
						<el-container class="maincontainer">
							<el-container class="submaincontainer">
						<el-card class="box-card" style="position:relative;width:50%" shadow="never" v-show="leftbar_show">

							<el-tree :expand-on-click-node="false" :default-expand-all="true" :data="combinationForm.data" :props="combinationForm.defaultProps"
							 node-key @node-click="handleNodeClick" show-checkbox @check="handleCheckChange" current-node-key ></el-tree><!-- @check-change="handleCheckChange"  check-strictly=true-->
							 
						</el-card>

						<el-card class="box-card" style="position:relative;width:65%" shadow="never">
	<!-- 						<div slot="header" class="clearfix">
 								<el-button-group style="float: right;margin-top:0px;">
									<el-button size="small" icon="el-icon-document-add" type="primary" @click="toolAction('选择确认')">确认选择</el-button>
								</el-button-group> 
							</div>-->
							<el-table ref="multipleTable" @select='selectionChange' :data="pagepersondata" tooltip-effect="dark" :height="tableHeight"
							 border highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange">
								<el-table-column type="selection" min-width="55">
								</el-table-column>
								<el-table-column v-for="column in ptablecolums" v-bind:prop="column.prop" v-bind:label="column.label"
								 v-bind:min-width="column.width" show-overflow-tooltip>
								</el-table-column>
							</el-table>
							<!-- 							<el-pagination @size-change="handlePersonSizeChange" @current-change="handlePersonCurrentPageChange" :current-page="queryPersonForm.pageNo"
							 :page-sizes="queryPersonForm.pagesizes" :page-size="queryPersonForm.pagesize" background layout="total,sizes, prev, pager, next"
							 :total="pagepersontotal">
							</el-pagination> -->
						</el-card>
						</el-container>
							</el-container>

					</el-tab-pane>

				</el-tabs>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="confirm" :disabled="submitDisable">确 定</el-button>
			</div>
			</template>
			</div>
	</body>

	<script src="./js/mytest.js"></script>

	</script>
</html>
